package com.sanshi.project.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 房屋资产
 *
 * @author nikon
 * @date 2023-11-18 14:11:56
 */
@Data
@TableName("house")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "房屋资产")
public class HouseEntity extends Model<HouseEntity> {


    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 父Id
     */
    @Schema(description = "父Id")
    private String parentId;

    /**
     * 拆分个数
     */
    @Schema(description = "拆分个数")
    private Integer splitCout;

    /**
     * 编码
     */
    @Schema(description = "编码")
    private String code;

    /**
     * 房号
     */
    @Schema(description = "房号")
    private String name;

    /**
     * 项目类型
     */
    @Schema(description = "项目类型")
    private String type;

    /**
     * 项目
     */
    @Schema(description = "项目")
    private Long projectId;

    /**
     * 楼栋
     */
    @Schema(description = "楼栋")
    private Long buildingId;

	/**
	 * 单元
	 */
	@Schema(description = "单元")
	private Long unitId;

    /**
     * 楼层
     */
    @Schema(description = "楼层")
    private Integer floor;

    /**
     * 产权归属
     */
    @Schema(description = "产权归属")
    private String ownership;

    /**
     * 产权单位
     */
    @Schema(description = "产权单位")
    private String unit;

    /**
     * 建筑面积
     */
    @Schema(description = "建筑面积")
    private BigDecimal floorArea;

    /**
     * 使用面积
     */
    @Schema(description = "使用面积")
    private BigDecimal useArea;

    /**
     * 空置日期
     */
    @Schema(description = "空置日期")
    private LocalDate vancancyDate;

    /**
     * 户型
     */
    @Schema(description = "户型")
    private String layout;

    /**
     * 朝向
     */
    @Schema(description = "朝向")
    private String orien;

    /**
     * 装修程度
     */
    @Schema(description = "装修程度")
    private String renovation;

    /**
     * 房屋用途
     */
    @Schema(description = "房屋用途")
    private String purpose;

    /**
     * 商圈
     */
    @Schema(description = "商圈")
    private String businessDistrict;

    /**
     * 产权证号
     */
    @Schema(description = "产权证号")
    private String realEstateCode;

    /**
     * 序号
     */
    @Schema(description = "序号")
    private Integer sort;

    /**
     * 添加类型
     */
    @Schema(description = "添加类型")
    private String addType;

    /**
     * 是否有证
     */
    @Schema(description = "是否有证")
    private String isCard;

    /**
     * 地址
     */
    @Schema(description = "地址")
    private String address;

    /**
     * 经度
     */
    @Schema(description = "经度")
    private BigDecimal lng;

    /**
     * 纬度
     */
    @Schema(description = "纬度")
    private BigDecimal lat;

    /**
     * 文件
     */
    @Schema(description = "文件")
    private String file;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 房屋状态
     */
    @Schema(description = "房屋状态")
    private String status;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记")
    private String delFlag;

    /**
     * 租户号
     */
    @Schema(description = "租户号")
    private Long tenantId;
}